<template>
  <van-row class="panel-index">
    <van-row class="menu-content">
      <van-grid :column-num="2">
        <van-grid-item :to="'/main/' + $vo.AssessType.CORP">
          <van-icon slot="icon" class-prefix="cspg" name="score cspg-color-blue" size="48" />
          <van-row slot="text" class="grid-item-text">公司考评</van-row>
        </van-grid-item>
        <van-grid-item :to="'/main/' + $vo.AssessType.DEPT">
          <van-icon slot="icon" class-prefix="cspg" name="score cspg-color-blue" size="48" />
          <van-row slot="text" class="grid-item-text">单位考评</van-row>
        </van-grid-item>
        <van-grid-item :to="'/rectify/main/' + $vo.AssessType.CORP">
          <van-icon slot="icon" class-prefix="cspg" name="rectify_c cspg-color-green" size="48" />
          <van-row slot="text" class="grid-item-text">公司整改</van-row>
        </van-grid-item>
        <van-grid-item :to="'/rectify/main/' + $vo.AssessType.DEPT">
          <van-icon slot="icon" class-prefix="cspg" name="rectify_d cspg-color-green" size="48" />
          <van-row slot="text" class="grid-item-text">单位整改</van-row>
        </van-grid-item>
        <!-- <van-grid-item v-if="isCorp === true" url="https://app.ehv.csg.cn:41888/dash/integration/6?rid=4975&hideLoading=true"> -->
        <van-grid-item v-if="isCorp === true" url="https://app.ehv.csg.cn:41888/dash/integration/6?rid=10318&hideLoading=true ">
          <van-icon slot="icon" class-prefix="cspg" name="dashboard2 cspg-color-yellow" size="42" />
          <van-row slot="text" class="grid-item-text">公司看板</van-row>
        </van-grid-item>
        <!--
        <van-grid-item v-if="isCorp === false" url="https://app.ehv.csg.cn:41888/dash/integration/6?rid=5002&hideLoading=true">
          <van-icon slot="icon" class-prefix="cspg" name="dashboard1 cspg-color-yellow" size="44" />
          <van-row slot="text" class="grid-item-text">单位看板</van-row>
        </van-grid-item>
        -->
        <van-grid-item to="/analysis/dept-main">
          <van-icon slot="icon" class-prefix="cspg" name="dashboard1 cspg-color-yellow" size="44" />
          <van-row slot="text" class="grid-item-text">单位看板</van-row>
        </van-grid-item>
            <!-- <van-grid-item :to="'/execelIntroduce/introduce/'+  + 0 "  > -->
        <!-- <van-grid-item to='/execelIntroduce/introduce/'>
            <van-icon slot="icon" class-prefix="cspg" name="import-data cspg-color-green" size="44" />
            <van-row slot="text" class="grid-item-text">单位导入</van-row>
        </van-grid-item>
        <van-grid-item to='/execelIntroduce/gsintroduce/'>
            <van-icon slot="icon" class-prefix="cspg" name="import-data cspg-color-green" size="44" />
            <van-row slot="text" class="grid-item-text">公司导入</van-row>
        </van-grid-item> -->
         <!-- <van-grid-item to='/Report/ReGsport/'>
            <van-icon slot="icon" class-prefix="cspg" name="import-data cspg-color-green" size="44" />
            <van-row slot="text" class="grid-item-text">智能报告</van-row>
        </van-grid-item> -->
         <van-grid-item to='/dealtwith/index/'>
            <van-icon slot="icon" class-prefix="cspg" name="import-data cspg-color-green" size="44" />
            <van-row slot="text" class="grid-item-text">待办</van-row>
        </van-grid-item>
      </van-grid>
    </van-row>
  </van-row>
</template>
<script>
// import { getUserDeptList } from '@/api/rectify'

export default {
  name: 'Index',
  data () {
    return {
      isCorp: true
    }
  },
  methods: {
    devopsTip () {
      this.$dialog.alert({
        message: '功能维护中……'
      })
    }
  },
  created(){
  },
  mounted () {
    this.$nextTick(function () {
      let ls = this.$store.state.authInfo.user.rectify
      for (var i = 0; i < ls.length; i++) {
        if (ls[i].department_path.includes('公司本部')) {
          this.isCorp = true
          return
        }
      }
      this.isCorp = false



    })
    // let _this = this
    /*
    getUserDeptList('xiongzhenqing').then(ret => {
      let { retCode, retData } = ret.data
      if (retCode === '0000') {
        this.$toast.fail('获取问题整改身份部门列表成功')
        this.errorMsg = '外层调用回调'
        console.log('外层回调')
        getUserDeptList('diaowangyuan').then(ret => {
          // let { retData } = ret
          console.log('内层回调')
          console.log('diaowangyuan')
          _this.errorMsg = '内层调用回调'
        })
      } else {
        console.log(retData[_this.$response.MESSAGE])
      }
    }, err => {
      console.log('获取用户信息失败')
      _this.error = err.toString()
      _this.$notify('服务调用失败：' + err.toString())
    }) */
  },
  methods:{
 

  }
}
</script>

<style scoped lang="less">
  .panel-index{
    padding: 5px;
    background-color: #F9F9F9;
    .menu-content {
      background-color: #FFFFFF;
      .grid-item-text{
        font-size: 14px;
        margin: 5px 0px;
      }
    }
  }
</style>
